<template>
	<view class="mainpadding2">
		<view class="flexcolumn" v-if="list.data.length==0">
			<view class="placeholderimage" style="margin-top: 200rpx;"></view>
			<view class="xiaohui margin_top main_size">暂无数据</view>
		</view>
		<view class="mainpadding_top ffffff dingwei  radius" v-for="item in list.data" :key="item.id">
			<view class="fuwulable" v-if="item.apply_status==1">待审核</view>
			<view class="fuwulable" style="background-color: #e6f7e9;color: #00A81F;" v-if="item.apply_status==2">通过</view>
			<view class="fuwulable" style="background-color: #fbeae6;color: #D02500;" v-if="item.apply_status==3">审核失败</view>
			<view class="flexleft">
				<image :src="item.logo_text" class="listleftimg radius margin_right2" mode=""></image>
				<view class="" style="width: 100%;">
					<view class="titletext xiaohei">{{item.name}}</view>
					<view class="flexbetween margin_top" style="width: 100%;">
						<view class="xiaohuang titletext fonweight">{{item.hm}}</view>
						<view class="xiaohong smalltext " v-if="item.price">
							<text>￥</text>
							<text class="titletext fonweight">{{item.price}}</text>
						</view>
					</view>
				</view>
			</view>
			<view class="margin_top2 xiaohui ershil" v-if="item.apply_bz">审核备注：{{item.apply_bz}}</view>
		</view>
		<view class="mainpadding ffffff flexbetween gudingdb">
			<!-- <view class="czbtn flexcenter" @click="jumpurl('/pages_mypage/baozhengj')">保证金</view> -->
			<view class="czbtn flexcenter" @click="show=true">保证金</view>
			<view class="czbtn flexcenter" @click="jumpurl('/pages_mypage/danmadd')">胆码订单</view>
			<view class="czbtn flexcenter" @click="jumpurl('/pages_mypage/tijiaodm')">提交胆码</view>
		</view>
		<u-popup :show="show" mode="center" round="10" closeable @close="show=false">
			<view class="mainpadding">
				<view class="">
					<view class=" sanshier xiaohei textcenter bold">添加客服</view>
					<image :src="wxkfImg" class="margin_top" style="width: 500rpx;" mode="widthFix"></image>
					<view class="xiaohui ershil margin_top textcenter">添加微信客服缴纳保证金</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				page: 1,
				limit: 12,
				list: {
					data: []
				},
				show:false,
				wxkfImg:""
			}
		},
		onLoad() {
			this.getSystem()
		},
		onShow() {
			this.init()
		},
		methods: {
			getSystem() {
				httpRequest.request('/api/index/getConfigInfoItem', 'POST', {
					pidtype: "otherset",
					type: "wechat_code",
				}, false, false, true).then(res => {
					this.wxkfImg = res.data
				})
			},
			init(isPage, page) {
				let _this = this
				httpRequest.request('/api/Dmkjcl/myDmkjIndex', 'GET', {
					page: page || 1,
					limit: 12,
				}).then(res => {
					uni.stopPullDownRefresh()
					if (res.code == 1) {
						let resList = res.data;
						let dataList = _this.list;
						if (isPage == true) {
							_this.list.data = dataList.data.concat(resList.data);
						} else {
							this.list = res.data
							_this.list.data = resList.data;
						}
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (list.last_page <= page) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},
		}
	}
</script>

<style>
.czbtn {
		width: 200rpx;
		height: 76rpx;
		font-size: 26rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 800;
		background-color: #fff2e8;
		border: 2rpx solid #FF7510;
		border-radius: 6rpx;
		color: #FF7510;
	}
</style>
